package com.caisejingyu.whales.home.devices.printer;

/**
 * Created by guazi on 16-9-13.
 */
public interface PrinterService {
    boolean print(String photo, String adi);

    boolean print(String photo, String rahmen, String adi, IPrintExcute print);

    void print(PrintTask printTask);

    PrinterState getPrinterState();

    boolean isPrinting();

    void resetPrintState();

    boolean isPrintableNow();

    boolean isFinishedNow();

    boolean isDeviceGood();

    boolean isLackPaper();

    void cancelPrinte();

    enum PrinterState {
        PRINT_ABLE,
        PRINTING,
        DEVICE_OFFLINE,
        LACK_INK,
        LACK_PAPER
    }


    abstract class PrintTask {

        public String mId;
        public String mPhoto;

        public PrintTask(String id, String photo) {
            mId = id;
            mPhoto = photo;
        }

        public abstract void printStart(String id);

        public abstract void printFinish(String id, boolean result);
    }
}
